﻿using System;
using System.IO;
using System.Threading.Tasks;

using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
namespace Xc.Views.Core
{
    /// <summary>
    /// 启抽象类
    /// </summary>
    public abstract class StartupBase : IStartupBase
    {
        public StartupBase(string applicationName, string applicationVersion)
        {
            ApplicationName = applicationName;
            ApplicationVersion = applicationVersion;
        }
        /// <summary>
        /// 启抽象类
        /// </summary>
        public StartupBase()
        {

        }
        /// <summary>
        /// 当前应用程序文件夹
        /// </summary>
        public virtual string ApplicationBaseDirectory => AppDomain.CurrentDomain.BaseDirectory;
        /// <summary>
        /// 应用程序名称
        /// </summary>
        public virtual string ApplicationName { get; set; }
        /// <summary>
        /// 应用程序版本
        /// </summary>
        public virtual string ApplicationVersion { get; set; }
        /// <summary>
        ///配置文件名称
        /// </summary>
        public virtual string AppSettingName
        {
            get
            {
                return $"AppSetting.{AppSettingFileType}";
            }
        }
        /// <summary>
        /// 设置文件文件类型
        /// </summary>
        public virtual AppSettingFileType AppSettingFileType { get; }
        /// <summary>
        /// 保存的文件夹名称
        /// </summary>
        public virtual Environment.SpecialFolder StoreFolderName { get; set; } = Environment.SpecialFolder.MyDocuments;
    }
}
